package com.sample.mapping;

import java.util.LinkedHashMap;

import javax.persistence.Column;

public class Friend<T> extends AbstractMapping<T> {

	@Column(name = "generateTimeId")
	private LinkedHashMap<T,T> friendMap;

	public LinkedHashMap<T,T > getFriendMap() {
		return friendMap;
	}

	public void setFriendMap(LinkedHashMap<T, T> friendMap) {
		this.friendMap = friendMap;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result
				+ ((friendMap == null) ? 0 : friendMap.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		Friend other = (Friend) obj;
		if (friendMap == null) {
			if (other.friendMap != null)
				return false;
		} else if (!(friendMap.size() == other.getFriendMap().size()))
			return false;
		return true;
	}
	

}
